package com.wnhz.work.yz.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.ArrayList;

/**
 * Created by admin on 2016/12/21.
 */
public class EntiretyBathroomAdapter extends FragmentPagerAdapter {
    private ArrayList<Fragment> lists;

    public EntiretyBathroomAdapter(FragmentManager fm) {
        super(fm);
    }


    public void setData(ArrayList<Fragment> lists) {
        this.lists = lists;
    }


    @Override
    public Fragment getItem(int position) {
        return lists == null ? null : lists.get(position % lists.size());
    }

    @Override
    public int getCount() {
        return lists == null ? 0 : lists.size();
    }
}
